package com.zyylr.classroomreservationsystem.web;

import retrofit2.Retrofit;
import retrofit2.converter.jackson.JacksonConverterFactory;

public class RetrofitFactory {
    private static final String BASE_URL = "http://118.25.4.225/ClassroomReservationSystemForAndroid/";
    private static final String LOCAL_URL = "http://localhost:8080/";

    public static Retrofit getRetrofit() {
        return new Retrofit.Builder()
                .baseUrl(BASE_URL)
                .addConverterFactory(JacksonConverterFactory.create())
                .build();
    }

    public static Retrofit getLocalRetrofit() {
        return new Retrofit.Builder()
                .baseUrl(LOCAL_URL)
                .addConverterFactory(JacksonConverterFactory.create())
                .build();
    }
}
